package com.lili.math;

/**
 * @Auther: 李 力
 * @Date: 2024/8/27
 * @Description: 可怜的小猪
 * @version: 1.0
 */
public class LeetCode458 {
    public static int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
        int times = minutesToTest / minutesToDie;
        int base = times + 1;
        double temp = Math.log10(buckets) / Math.log10(base);
        int ans = (int) Math.ceil(temp);
        return ans;
    }
}
